package org.dousb.doupicturebackend.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import org.dousb.doupicturebackend.model.dto.space_user.SpaceUserAddRequest;
import org.dousb.doupicturebackend.model.dto.space_user.SpaceUserQueryRequest;
import org.dousb.doupicturebackend.model.entity.SpaceUser;
import org.dousb.doupicturebackend.model.vo.SpaceUserVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author Administrator
 * @description 针对表【space_user(空间用户关联)】的数据库操作Service
 * @createDate 2025-10-22 15:01:53
 */
public interface SpaceUserService extends IService<SpaceUser> {

    /**
     * 添加空间用户
     *
     * @param spaceAddRequest
     * @return
     */
    long addSpaceUser(SpaceUserAddRequest spaceAddRequest);

    /**
     * 封装查询
     *
     * @param spaceUserQueryRequest
     * @return
     */
    QueryWrapper<SpaceUser> getQueryWrapper(SpaceUserQueryRequest spaceUserQueryRequest, HttpServletRequest request);

    /**
     * 封装返回值
     *
     * @param spaceUser
     * @param request
     * @return
     */
    SpaceUserVO getSpaceUserVO(SpaceUser spaceUser, HttpServletRequest request);

    /**
     * 批量封装返回值
     *
     * @param spaceUserList
     * @param request
     * @return
     */
    List<SpaceUserVO> getSpaceUserVOList(List<SpaceUser> spaceUserList, HttpServletRequest request);

    /**
     * 校验空间用户
     *
     * @param spaceUser
     */
    void validSpaceUser(SpaceUser spaceUser, boolean add);

}
